/* Ejercicio 5.18
   ejer5_18.c */
#include <stdio.h>

/* Prototypes */
int even( int number );

/* function main begins program execution */
int main( void )
{
    int n;

    printf( "Enter a number: " );
    scanf( "%d", &n );

    if ( even( n ) ) {
        printf( "%d is even\n", n );
    }
    else {
        printf( "%d is odd\n", n );
    }
	return 0;
} /* end function main */

/* Return 1 if it is a even number, otherwise return 0 */
int even( int number )
{
    return number % 2 == 0;
}
